<template>
  <div class="get_excel bgwh">
    <div class="ks-row-middle-between pl24 pr24 excelNav bgwh sz">
      <template>
        <el-button @click="$router.go(-1)"> 关闭 </el-button>
      </template>
      <div class="g3 f16 b ks-col ml20">
        {{ title }}
      </div>
      <template>
        <el-button
          size="small"
          :loading="printLoading"
          type="text"
          @click="$emit('goPreview')"
        >
          <div class="ks-row-middle">
            <i class="el-icon-view f18"></i>
            <span>预览</span>
          </div>
        </el-button>
        <el-button size="small" type="text" @click="$emit('setting')">
          <div class="ks-row-middle">
            <i class="el-icon-setting f18"></i>
            <span>全局设置</span>
          </div>
        </el-button>
        <el-button
          size="small"
          :loading="saveLoading"
          type="text"
          @click="$emit('save')"
        >
          <div class="ks-row-middle">
            <i class="el-icon-upload f18"></i>
            <span>保存</span>
          </div>
        </el-button>
      </template>
    </div>
    <slot></slot>
  </div>
</template>

<script>
export default {
  props: ['title', 'printLoading', 'saveLoading'],
  methods: {}
}
</script>
<style lang="scss" scoped>
.get_excel {
  height: 100%;
}
.excelNav {
  height: 64px;
  box-shadow: 0px 1px 4px 0px rgba(0, 21, 41, 0.12);
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
}
</style>
